/**
 * 冒泡排序
 */
package com.study.s02.sort;

public class BubbleSort {
	
	public static void sort(long[] array) {
		
		long tmp;
		for (int i = 0; i < array.length - 1; i++) {
			for(int j = array.length - 1; j > i; j--) {
				if(array[j] < array[j - 1]) {
					tmp = array[j];
					array[j] = array[j - 1];
					array[j - 1] = tmp;
				}
			}
		}
	}
}
